/**
 * @class cceaf.control.GroupPicker
 * @extends cceaf.control.TreePicker
 * 
 * 选择组织树的下拉框
 */
Ext.define('cceaf.control.GroupPicker', {
    extend: 'cceaf.control.TreePicker',
    requires: [
	    'cceaf.ControlDefaultConfig'
    ],
    alias: 'widget.cceafgrouppicker',

    displayField: 'text', 
    
    store: new Ext.data.TreeStore({
    	autoLoad: true,
        proxy: {
            type: 'ajax',
            url: 'pageDataProvider!getGroupTreeList.action?type=1'
        },
        model: 'cceaf.model.main.TreeNodeModel',
        root: {
            expanded: true,
            text: '',
	        draggable:false,
	        id:''
        }
    }),
    
    constructor: function(config){
		config = config || {};
		
		var defaultFieldWidth = cceaf.ControlDefaultConfig.DEFAULT_FIELD_WIDTH;
		config = Ext.applyIf(config, {
			width: defaultFieldWidth
		});

		cceaf.control.GroupPicker.superclass.constructor.apply(this, arguments);
	}

});

